import React, { useState, useEffect } from "react";
import { Spin, Input } from "antd";
import { NoAccess } from '@components'
import styles from "./styles/riskPosition.module.css";

import { useUtils } from "./utils";

const RiskPosition = () => {
  const [spinning, setSpinning] = useState(false);
  const [isNoAccess, setIsNoAccess] = useState(false);
  const { init } = useUtils(setSpinning, setIsNoAccess);

  useEffect(() => {
    init()
  }, []);

  const spinOption = {
    size: "large",
    tip: "正在加载中...",
    spinning,
  };

  return (
    <div className={`page-content ${styles.riskPosition}`}>
      <Spin {...spinOption} >
        {isNoAccess ? <NoAccess /> : <>
          <div className={styles.search}>
            <label>搜索: </label>
            <input id='searchInput' placeholder="请输入关键字定位"/>
          </div>
          <div id='container'></div>
        </>}
      </Spin>
    </div>
  );
};

export default RiskPosition;
